from django.shortcuts import render
from .models import ChatGroup, ChatUser


def index(request):
    return render(request, "chat/index.html")
    
    
def room(request, group_id):
    group = ChatGroup.objects.get(id=group_id)
    user = request.user
    # user = ChatUser.objects.get(id=1)
    return render(request, "chat/chat.html", {"group": group, "user": user})
